#!/bin/bash
rm -rf /usr/share/nginx/html/*
cp -r /app/html/. /usr/share/nginx/html
cp /app/nginx.conf /etc/nginx/nginx.conf
#echo "cp finish"
nginx

if [ ! ${nginxURL} ]; then
    echo "no param"
else
    echo ${nginxURL}
    curl ${nginxURL}/nginxWebUI/adminPage/www/delByName -F "name=html/noctua-admin" -v
    curl ${nginxURL}/nginxWebUI/adminPage/main/upload -F "file=@/app/noctua-admin.zip" -v
    curl ${nginxURL}/nginxWebUI/adminPage/www/update -F "id=1611282956" -F "name=html/noctua-admin" -F "dir=/home/nginxWebUI/cert/noctua-admin.zip" -v
fi

tail -f /dev/null
